//
//  BCGeneralConst.m
//  GSBlockChain
//
//  Created by guoshikeji_a on 2018/11/15.
//  Copyright © 2018年 guoshikeji. All rights reserved.
//

#import "BCGeneralConst.h"

//比特币单位
NSString *const kBTC = @"BTC";
//以太坊单位
NSString *const kETH = @"ETH";
//美元单位
NSString *const kUSD = @"USD";
//人民币
NSString *const kCNY = @"CNY";

//将单位type转化为string
NSString* BConvertMonetaryUnitToString(BCMonetaryUnit unit) {
    switch (unit) {
        case BCMonetaryUnitUSD:
            return kUSD;
            break;
        case BCMonetaryUnitCNY:
            return kCNY;
            break;
        default:
            break;
    }
    return nil;
}
//将string转化为type
BCMonetaryUnit BConvertStringToMonetaryUnit(NSString* string) {
    if ([string isEqualToString:kUSD]) {
        return BCMonetaryUnitUSD;
    }else if ([string isEqualToString:kCNY]) {
        return BCMonetaryUnitCNY;
    }
    return -1;
}


//将币种类型转化为string
NSString* BConvertCoinTypeToString(BCCoinType type) {
    switch (type) {
        case BCCoinTypeBTC:
            return kBTC;
            break;
        case BCCoinTypeETH:
            return kETH;
            break;
        default:
            break;
    }
    return nil;
}
//将string转化为type
BCCoinType BConvertStringToCoinType(NSString* string) {
    if ([string isEqualToString:kBTC]) {
        return BCCoinTypeBTC;
    }else if ([string isEqualToString:kETH]) {
        return BCCoinTypeETH;
    }
    return -1;
}





#pragma mark - 固定视图高度相关
//如果按钮在底部时的高度 不包括底部安全高度
CGFloat const BCBottomViewHeight = 50.0f;


#pragma mark - 应用keychain相关
NSString* const SAMKeychainService = @"com.guoshikeji.blockChain";

#pragma mark - 用户安全中心相关
/**
 用户安全中心数据更新后的通知
 */
NSString* const UserSafeCenterUpdateNotification = @"userSafeCenterDataUpdateNotification";

#pragma mark - 用户首页切换了区域通知
NSString* const HomeRegionChangedNotification = @"homeRegionChangedNotification";

#pragma mark - 用户切换语言后通知
NSString* const UserSettingLanguageChangedNotification = @"userSettingLanguageChangedNotification";

#pragma mark - appStore跳转链接
NSString* const AppStoreConnectURLString = @"https://itunes.apple.com/app/id1449236123";
